package com.springboot.search.entity;

import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;
import java.math.BigInteger;

@Data
@Document(indexName = "goods",type = "doc",useServerConfiguration = true,createIndex=false)
public class ESGoods {
    @Id
    private BigInteger id;

    @Field(type = FieldType.Text,index = true,analyzer = "ik_smart")
    private String goodsName;

    @Field(type = FieldType.Text,index = true,analyzer = "ik_smart")
    private String goodsNameEn;

    @Field(type = FieldType.Text,index = true,analyzer = "ik_smart")
    private String goodsDescribe;
}
